package com.aring.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.aring.dao.UserMapper;
import com.aring.pojo.User;
import com.aring.service.UserService;

@Service("userService")
public class UserServiceImpl implements UserService{
  
	@Autowired
	private UserMapper userMapper;
	
	@Override
	public User getUserById(int userId) {	
		return userMapper.selectByPrimaryKey(userId);
	}

	@Override
	public int register(User user) {
		return userMapper.saveUser(user);
	}

	@Override
	public User login(User user) {
		return userMapper.userLogin(user);
	}
	
}
